package com.bjsxt.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bjsxt.domain.CashWithdrawAuditRecord;
import com.bjsxt.domain.CashWithdrawals;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bjsxt.model.CashSellParam;

/**
* @date:2022/1/13 20:50
* @author:yang
*/
public interface CashWithdrawalsService extends IService<CashWithdrawals>{


        /**
         * 提现记录的查询
         * @param page
         * @param userId
         * @param userName
         * @param mobile
         * @param status
         * @param numMin
         * @param numMax
         * @param startTime
         * @param endTime
         * @return
         */
        Page<CashWithdrawals> findByPage(Page<CashWithdrawals> page, Long userId, String userName, String mobile, Byte status, String numMin, String numMax, String startTime, String endTime);

        /**
         * 审核提现记录
         * @param userId
         * @param cashWithdrawAuditRecord
         * @return
         */
        boolean updateWithdrawalsStatus(Long userId, CashWithdrawAuditRecord cashWithdrawAuditRecord);

        /**
         * 查询当前用户的充值记录
         * @param page
         * @param userId
         * @param status
         * @return
         */
        Page<CashWithdrawals> findCashWithdrawals(Page<CashWithdrawals> page, Long userId, Byte status);

        /**
         * GCN提现操作
         * @param userId
         * @param cashSellParam
         * @return
         */
        boolean sell(Long userId, CashSellParam cashSellParam);
    }
